Health Cloud Diagnostics System API - Implementation Template

(0 reviews)

Developer guide

Diagnostics Dev Guide

The US-Core Diagnostics application uses the following DataWeave modules to map between Health Cloud and FHIR formats.

ModuleDescription
DiagnosticReportFHIRToolsDiagnosticReportFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
DiagnosticReportRequestThis module defines functions needed to convert a FHIR DiagnosticReport resource into its representation within Health Cloud.
ObservationFHIRTools
ObservationRequestThis module defines functions needed to convert a FHIR Observation resource into its representation within Health Cloud.
UtilA library with needed dataweave utility functions.

DiagnosticReportFHIRTools

DiagnosticReportFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.

Source: .src/main/resources/dwl/DiagnosticReport/DiagnosticReportFHIRTools.dwl

Functions

fun getDiagnosticReportIdentifiers (identifiers, digReport)

Gets the diagnosticReport identifiers with the provided HC ID array and returns a list of FHIR DiagnosticReport objects.

param idTypeMap is a map of HC Ids to FHIR identifier codes.
param identifiers is an array of HC identifier objects.
return An array of FHIR Identifier objects.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

DiagnosticReportRequest

This module defines functions needed to convert a
FHIR DiagnosticReport resource into its representation within
Health Cloud.

Source: .src/main/resources/dwl/DiagnosticReport/DiagnosticReportRequest.dwl

Functions

fun getDiagnosticReportUpsert (fhirObj, codeSetBundleList, categoryLookup, carePerformerIds)

Converts the provided DiagnosticReport FHIR object to the Health Cloud DiagnosticSummary object.

param fhirObj is a FHIR DiagnosticReport object.
param codeSetBundleList is list of Codeset Bundle records.
param categoryLookup is lookup response of FHIR Codesets object.
param carePerformerIds is Salesforce Ids for practitioner references.
return A Health Cloud DiagnosticSummary object.

fun getDiagnosticReportUpdate (fhirObj, codeSetBundleList, categoryLookup, carePerformerIds)

Converts the provided DiagnosticReport FHIR object to the Health Cloud DiagnosticSummary object for Update of Diagnostic Report.

param fhirObj is a FHIR DiagnosticReport object.
param codeSetBundleList is a list of Codeset Bundle records.
param categoryLookup is the lookup response of FHIR Codesets object.
param carePerformerIds is Salesforce Ids for practitioner references.
return A Health Cloud DiagnosticSummary object.

fun getDiagnosticReportIdentifier (identifier, diagnosticReportId, typeId)

Converts the provided DiagnosticReport FHIR object to the Health Cloud Identifier object.

param identifier is a FHIR DiagnosticReport identifier object.
return A Health Cloud Identifier object.

fun getCodeSetUpsert (codeSetList)

Converts the provided DiagnosticReport FHIR object to the Health Cloud CodeSet object.

param codeSetList is the list of codeSet object.
return Health Cloud CodeSet upsert fields.

fun getCodeSetBundleUpsert (codeSetList, bundleType, name)

Converts the provided DiagnosticReport FHIR object to the Health Cloud CodeSetBundle object.

param codeSetList is the list of CodeSetBundle object.
param bundleType is for defining the CodeSetBundle type.
param name is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.

(back to top)

ObservationFHIRTools

Source: .src/main/resources/dwl/Observation/ObservationFHIRTools.dwl

Functions

fun getObservationResponse (observation: Object, codeId, identifiers, searchLookupResponse, unitMeasureCodes)

Generates the observation response object in FHIR format with the provided observation object, identifiers, and code set bundles. Queried from Health Cloud.

param observation is a HC Observation object.
param codeId code id associated for the observation
param identifiers a list of identifiers
return of FHIR formatted Observation object.

fun getCategory (categoryDisplay, searchLookupResponse)

Gets the Category if found or null if not.

param categoryDisplay is category display value.
param searchLookupResponse is response from FHIR Codeset object.
return a Category as FHIR formatted Method object.

fun getCode (obs, codeId)

Gets the code object with the provided observation object and returns null if not found.

param obs is a HC Code object.
param codeId is codeset record.
return An array of FHIR formatted Code objects.

fun getIdentifier (observation, identifiers)

Gets the observation identifiers with the provided HC ID array and returns a list of FHIR Observation objects.

param observation is the observation object that has references to codes
param identifiers is an array of HC identifier objects.
return An array of FHIR Identifier objects.

fun getBodySite (obs)

Gets the bodySite object with the provided observation object and returns null if not found.

param obs is a HC bodySite object.
return An array of FHIR formatted BodySite objects.

fun getInterpretation (interpretationDisplay, searchLookupResponse)

Gets the Interpretation if found or null if not.

param interpretationDisplay is Interpretation display value.
param searchLookupResponse is response from FHIR Codeset object.
return a Interpretation as FHIR formatted Method object.

fun getMethod (obs)

Gets the method object with the provided observation object and returns null if not found.

param obs is a HC method object.
return An array of FHIR formatted Method objects.

fun getValueCodeableConcept (obs)

Gets the valueCodeableConcept object if found or null if not.

param obs is a HC method object.
return a CodeableConcept as FHIR formatted Method object.

fun getValueRatio (observation, unitMeasureCodes)

Gets the valueRatio object if found or null if not.

param observation is a HC method object.
param unitMeasureCodes is lookup response of UnitOf​Measure object.
return a Ratio as FHIR formatted Method object.

fun getComponentData (componentCodeSets, components, searchLookupResponse, unitMeasureCodes)

Gets the Component object if found or null if not.

param componentCodeSets a list of component codeset HC objects .
param components a list of components
return a Component Data as FHIR formatted Method object.

fun getComponentCode (obs)

Gets the Component Code if found or null if not.

param obs codeset HC objects .
return a Component Code as FHIR formatted Method object.

fun getComponentInterpretation (componentInterpretation, searchLookupResponse)

Gets the Component Interpretation if found or null if not.

param componentInterpretation is componentInterpretation display value.
param searchLookupResponse is response from FHIR Codeset object.
return a Component Interpretation as FHIR formatted Method object.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

ObservationRequest

This module defines functions needed to convert a
FHIR Observation resource into its representation within
Health Cloud.

Source: .src/main/resources/dwl/Observation/ObservationRequest.dwl

Functions

fun getObservationDetails (fhirObj, codeSetBundleList, codeId, sourceSystem, lookupResponse, unitMeasureCodes)

Converts the provided Observation FHIR object to the Health Cloud CareObservation object.

param fhirObj is a FHIR Observation object.
return A Health Cloud Observation object.

fun getObservationDetailsUpdate (fhirObj, codeSetBundleList, codeId, sourceSystem, lookupResponse, unitMeasureCodes)

Converts the provided Observation FHIR object to the Health Cloud CareObservation object.

param fhirObj is a FHIR Observation object.
return A Health Cloud Observation object.

fun getObservationIdentifier (identifier, observationId, typeId)

Converts the provided Observation FHIR object to the Health Cloud Identifier object.

param identifier is a FHIR Observation identifier object.
return A Health Cloud Identifier object.

fun getObservationComponents (components, observationId, codeSetBundleList, Index, lookupResponse, unitMeasureCodes)

Converts the provided Observation Component FHIR object to the Health Cloud CareObservationComponent object.

param components is a FHIR Observation Component object.
return A Health Cloud Observation object.

fun getCodeSetUpsert (codeSetList)

Converts the provided Observation FHIR object to the Health Cloud CodeSet object.

param codeSetList is the list of codeSet object.
return Health Cloud CodeSet upsert fields.

fun getCodeSetBundleUpsert (codeSetList, bundleType, name)

Converts the provided Observation FHIR object to the Health Cloud CodeSetBundle object.

param codeSetList is the list of CodeSetBundle object.
param bundleType is for defining the CodeSetBundle type.
param name is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.

fun getResultIds (res)

This function takes the results of a Salesforce query and returns a list of IDs.

param res is a Salesforce query result.
return An array with a list of Ids found.

(back to top)

Util

A library with needed dataweave utility functions.

Source: .src/main/resources/dwl/Util.dwl

Functions

fun clean (obj: Object)

Cleans the provided object of blank strings, null values, empty objects, and empty arrays.

param obj is an Object to clean.
return A cleaned object.

fun clean (arr: Array)

Cleans the provided array of blank strings, null values, empty objects, and empty arrays.

param arr is an Array to clean.
return A cleaned Array.

fun removeNull (arr: Array)

Removes all null items from an array.

param arr is an array.
return An array with null items removed.

fun removeNull (obj: Object)

Removes all null values from an object.

param obj is an object.
return An object with null values removed.

fun getPickListValue (req, lookupReq)

Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.

param req is a FHIR object field, lookupReq is from FHIRCodeSetc. return_ value for the picklist field.

fun getOrganizationAccount (fhirObj, codeSetLU)

Converts the provided Organization FHIR object to the Health Cloud Account object.

param fhirObj is a FHIR Organization object.
return A Health Cloud Account object.

(back to top)


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onJan 2, 2024
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0